package org.douxiaoban.client.activity;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import org.douxiaoban.client.R;
import org.douxiaoban.client.app.App;

/**
 * Created by IntelliJ IDEA.
 * User: huangzhongkun
 * Date: 11-7-2
 * Time: 下午4:55
 */
public class BaseActivity extends Activity {
    private App _app ;

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        _app =  (App)getApplicationContext();

    }

     @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.menu,menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        _app.mentOptions(item.getItemId(),this);
        return true; 
    }
}